﻿using Jim.K3Cloud;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jim.K3Cloud;

[Sdk("Kingdee.BOS.ServiceFacade.ServicesStub.Metadata.MetadataService.GetAllExtendObjectTypes", "取得全部扩展对象")]
public class K3CloudGetMenuTemplatesRequest : ISdkRequest<K3CloudGetAllExtendObjectTypesResponse>
{
    public ElementType elementType { get; set; }

    public void Validate()
    {
    }
}


public class K3CloudGetMenuTemplatesResponse : SdkResponse<K3CloudBarDataManager>
{

}

/// <summary>菜单管理（包括工具条、菜单、弹出菜单、状态条，统称为菜单）</summary>
public class K3CloudBarDataManager
{
    /// <summary>是否运行时</summary>
    public bool IsRuntime { get; set; }

    /// <summary>编码</summary>
    public string Id { get; set; }

    /// <summary>顶级菜单集合</summary>
    public List<K3CloudBarItem> TopLevelBarItems { get; set; }

}



/// <summary>
/// 描述：动态框架-动态菜单-菜单项数据模型.
/// Bar是对菜单条，状态条，工具条的抽象
/// BarItem是对Bar本身及可能出现在Bar上菜单项，工具条按钮，状态条状态栏的抽象
/// 表示菜单时，
/// 可以表示主菜单或弹出菜单，对应style分别为MainMenu或者PopupMenu
/// 主菜单的子菜单，如常见的File菜单，style为BarSubItem，即子菜单类型
/// 也可以表示子菜单的菜单项，如File菜单下New File菜单项，style可以是BarButtonItem，BarCheckItem等
/// 表示工具条
/// 表示工具条，style为ToolBar
/// 工具条命令，与子菜单的菜单项相同
/// </summary>
[Serializable]
public class K3CloudBarItem
{
    public const int DfVisible = 2147483647;
    /// <summary>可见性_单据上可见</summary>
    public const int VIS_BILL = 1;
    /// <summary>可见性_序时簿上可见</summary>
    public const int VIS_LIST = 2;
    /// <summary>可见性_设计状态可见</summary>
    public const int VIS_NOVIS_DESIGN = 4;
    /// <summary>可见性_仅设计可见??</summary>
    public const int VIS_ONLYDESIGNPOPERTY = 8;
    /// <summary>可见性_审核后可见</summary>
    public const int VIS_AUTIDING = 16;
    /// <summary>可见性_单据查看可见</summary>
    public const int VIS_VIEW = 32;
    /// <summary>可见性_单据新增可见</summary>
    public const int VIS_NEW = 64;
    /// <summary>可见性_单据维护可见</summary>
    public const int VIS_EDIT = 128;
    /// <summary>可见性_过滤条件字段列表可见</summary>
    public const int VIS_FILTER = 256;
    /// <summary>可见性_在排序列表可见</summary>
    public const int VIS_SORT = 512;
    /// <summary>可见性_默认显示 (显示隐藏列是否勾选)</summary>
    public const int VIS_DEFAULT = 1024;
    /// <summary>可见性_移动商务可见性</summary>
    public const int VIS_MOBILEBUSINESS = 2048;
    /// <summary>可见性_套打可见性</summary>
    public const int VIS_PRINT = 4096;
    /// <summary>可见性_快速查询可见性</summary>
    public const int VIS_QKQUERY = 8192;
    /// <summary>可见性_是否发布工作流事件</summary>
    public const int VIS_EVENT = 16384;
    /// <summary>可见性_是否发布叙事簿链接</summary>
    public const int VIS_LISTLINK = 32768;
    /// <summary>可见性_F8列表</summary>
    public const int VIS_LISTF8 = 65536;
    /// <summary>业务对象元素默认标示；用于LayoutInfo中，把业务对象整体属性和分录区分开</summary>
    public const string FORM_KEY = "_BILL";
    /// <summary>单据体元素默认标示；用于LayoutInfo中，把单据头和其他分录区分开</summary>
    public const string BILL_HEAD = "FBillHead";
    /// <summary>菜单按钮可用性_查看不可用</summary>
    public const int MENUENABLE_VIEW = 1;
    /// <summary>菜单按钮可用性_新增不可用</summary>
    public const int MENUENABLE_NEW = 2;
    /// <summary>菜单按钮可用性_修改不可用</summary>
    public const int MENUENABLE_EDIT = 4;
    /// <summary>菜单按钮可见性_查看不可见</summary>
    public const int MENUVISIBLE_VIEW = 1;
    /// <summary>菜单按钮可见性_新增不可见</summary>
    public const int MENUVISIBLE_NEW = 2;
    /// <summary>菜单按钮可见性_修改不可见</summary>
    public const int MENUVISIBLE_EDIT = 4;
    /// <summary>菜单按钮可见性_初始加载不可见</summary>
    public const int MENUVISIBLE_INITIALLOADVISIBLE = 8;
    /// <summary>菜单按钮可见性_单 组织不可见</summary>
    public const int MENUVISIBLE_SINGLEORGVISIBLE = 16;
    /// <summary>菜单按钮可见性_多组织 不可见</summary>
    public const int MENUVISIBLE_MULTIORGVISIBLE = 32;
    /// <summary>菜单按钮可用性_普通列表不可见</summary>
    public const int MENUENABLE_LIST = 1;
    /// <summary>菜单按钮可用性_选单列表不可见</summary>
    public const int MENUENABLE_SElBILL = 2;
    /// <summary>菜单按钮可用性_上下查列表不可见</summary>
    public const int MENUENABLE_TRACKBILL = 4;
    /// <summary>菜单按钮可见性_普通列表不可见</summary>
    public const int MENUVISIBLE_LIST = 1;
    /// <summary>菜单按钮可见性_选单列表不可见</summary>
    public const int MENUVISIBLE_SElBILL = 2;
    /// <summary>菜单按钮可见性_上下查列表不可见</summary>
    public const int MENUVISIBLE_TRACKBILL = 4;

    public LocaleValue Top { get; set; }

    public LocaleValue Left { get; set; }

    public LocaleValue Width { get; set; }

    public LocaleValue Height { get; set; }


    /// <summary>帮助上下文标识</summary>
    public string HelpContextId { get; set; }

    /// <summary>原始标示</summary>
    public string OriginKey { get; private set; }

    /// <summary>元素类型编码</summary>
    [DefaultValue(0)]
    public virtual int ElementType { get; set; }

    /// <summary>是否设计时调用</summary>
    public bool Design { get; set; }

    /// <summary>菜单名（标识）</summary>
    public string Name { get; set; }

    /// <summary>图标</summary>
    public string ImageKey { get; set; }

    /// <summary>快捷键</summary>
    public string Shortcut { get; set; }

    /// <summary>是否可用 1：可用 0：不可用</summary>
    [DefaultValue(-1)]
    public int Enabled { get; set; }

    /// <summary>是否可见 1：可见 0：不可见</summary>
    [DefaultValue(-1)]
    public int Visible { get; set; }

    /// <summary>复选</summary>
    public int Checked { get; set; }

    /// <summary>分组开始</summary>
    public bool IsBeginGroup { get; set; }

    /// <summary>顺序号</summary>
    public int Seq { get; set; }

    /// <summary>工具栏提示</summary>
    public LocaleValue ToolTip { get; set; }

    /// <summary>工具栏标签</summary>
    public LocaleValue Description { get; set; }

    /// <summary>标题位置</summary>
    public int TitlePosition { get; set; }

    /// <summary>是否显示标题</summary>
    [DefaultValue(false)]
    public bool IsShowTitle { get; set; }

    /// <summary>提交时进行客户端校验</summary>
    [DefaultValue(false)]
    public bool CommitValidation { get; set; }

    /// <summary>菜单风格（按钮、复选、工具栏、主菜单等等）</summary>
    public K3CloudEnumBarItemStyle Style { get; set; }

    /// <summary>边框宽度</summary>
    public string BorderWidth { get; set; }

    /// <summary>是否显示进度条</summary>
    public bool ShowProcessBar { get; set; }

    /// <summary>进度条提示信息</summary>
    public LocaleValue ProcessBarMsg { get; set; }



}

